# Copyright 2016, 2017 Peter Dimov
# Copyright 2019, 2020 Mikhail Komarov <nemo@nil.foundation>
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
#
# This file should be used in couple of configurations:
#
# 1. Configuration for building at boostorg/multiprecision TravisCI.
# This means no actual build with CMake should be performed, only configuration.
#
# 2. Configuration for building with less CI-loaded projects.
# This means not only configuration with CMake should be performed, but also
#  build and test should be executed.
# To make this script be fine for building and testing with CMake, uncommend
#  copy and paste following lines before the last 'fi' at 'script' section:
#
#------------------------------------------------------------------------------#
#if [[ $TEST_SUITE == compile_fail ]]; then
#  if [[ $TRAVIS_OS_NAME == linux ]]; then
#    ctest --build-and-test .. . --build-generator "Unix Makefiles" --tests-regex "multiprecision_test_compile_fail_*" -j $(($(nproc) + 1));
#  elif [[ $TRAVIS_OS_NAME == osx ]]; then
#    ctest --build-and-test .. . --build-generator "Unix Makefiles" --tests-regex "multiprecision_test_compile_fail_*" -j $(($(sysctl -n hw.ncpu) + 1));
#  fi
#else
#  if [[ $TRAVIS_OS_NAME == linux ]]; then
#    cmake --build . --target multiprecision_test_suite_$TEST_SUITE -- -j$(($(nproc) + 1));
#  elif [[ $TRAVIS_OS_NAME == osx ]]; then
#    cmake --build . --target multiprecision_test_suite_$TEST_SUITE -- -j$(($(sysctl -n hw.ncpu) + 1));
#  fi
#fi
#------------------------------------------------------------------------------#

language: cpp

sudo: true

python: "2.7"

dist: xenial

os:
  - linux
  - osx

branches:
  only:
    - master
    - develop
    - cmake-develop
    - cmake-master
    - 6-shanks-tonelli

env:
  matrix:
    - BOGUS_JOB=true

matrix:

  exclude:
    - env: BOGUS_JOB=true

  include:
    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE="examples compile_fail"
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE="examples compile_fail"
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE="examples compile_fail"
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE="examples compile_fail"
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-6
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE="compile_fail examples"
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-5
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE=arithmetic_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE=cpp_int_tests
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++14 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE=functions_and_limits
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++14 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE=conversions
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++14 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE=misc
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE="compile_fail examples"
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE="compile_fail examples"
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE="compile_fail examples"
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE="compile_fail examples"
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++03 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++11 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: linux
      env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++17 TEST_SUITE=concepts
      addons:
        apt:
          packages:
            - g++-8
            - cmake
            - libgmp-dev
            - libmpfr-dev
            - libmpc-dev
            - libmpfi-dev
            - libtommath-dev
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-xenial-8

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=arithmetic_tests
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=cpp_int_tests
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=functions_and_limits
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=conversions
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=misc
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE="compile_fail examples"
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=concepts
      osx_image: xcode9.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=arithmetic_tests
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=cpp_int_tests
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=functions_and_limits
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=conversions
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=misc
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE="compile_fail examples"
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=concepts
      osx_image: xcode8.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=arithmetic_tests
      osx_image: xcode7.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=cpp_int_tests
      osx_image: xcode7.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=functions_and_limits
      osx_image: xcode7.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=conversions
      osx_image: xcode7.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=misc
      osx_image: xcode7.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE="compile_fail examples"
      osx_image: xcode7.3

    - os: osx
      env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=concepts
      osx_image: xcode7.3

install:
  - cd ..
  - if [[ $TRAVIS_BRANCH == master || $TRAVIS_BRANCH == cmake-master ]]; then
    git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root;
    elif [[ $TRAVIS_BRANCH == develop || $TRAVIS_BRANCH == cmake-develop ]]; then
    git clone -b develop --depth 1 https://github.com/boostorg/boost.git boost-root;
    else
    git clone -b develop --depth 1 https://github.com/boostorg/boost.git boost-root;
    fi
  - cd boost-root
  - git submodule update --init tools/build
  - git submodule update --init libs/config
  - git submodule update --init tools/boost_install
  - git submodule update --init libs/headers
  - git submodule update --init tools/boostdep
  - cp -r $TRAVIS_BUILD_DIR/* libs/multiprecision
  - python tools/boostdep/depinst/depinst.py multiprecision
  - ./bootstrap.sh
  - ./b2 headers

script:
  - |-
    echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
  - if [[ $TRAVIS_OS_NAME == linux ]]; then
    proc=$(($(nproc) + 1));
    elif [[ $TRAVIS_OS_NAME == osx ]]; then
    proc=$(($(sysctl -n hw.ncpu) + 1));
    fi;
  - (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET && ./config_info_travis);
  - (cd libs/multiprecision/test && ../../../b2 -j$proc toolset=$TOOLSET $TEST_SUITE define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER);
  - sudo ./b2 -j$proc install;
  - cd $TRAVIS_BUILD_DIR && mkdir cmake-build && cd cmake-build;
  - if [[ $(echo $CXXSTD | sed 's/[^0-9]*//g') == 03 ]]; then
    CXXSTD=c++98;
    fi;
  - if [[ $CXXSTD == c++1z ]]; then
    CXXSTD=c++17;
    fi;
  - cmake -DBUILD_TESTS=TRUE -DCMAKE_CXX_STANDARD=$(echo $CXXSTD | sed 's/[^0-9]*//g') -DBUILD_WITH_CI_KNOWN_ISSUES_SUPPRESS=TRUE ..;

notifications:
  email:
    on_success: always
